<?php

/**
 * BaseTcontenedor
 * 
 * This class is member of the DAO layer.
 * 
 * @property integer $id
 * @property integer $idImportacion
 * @property string $bl
 * @property string $nroContenedor
 * @property integer $articulo
 * @property float $cantidad
 * @property timestamp $finsert
 * @property Importacion $Importacion
 * @property Marticulo $Marticulo
 * 
 * @author     Claudio Corlatti <corlatti@gmail.com>
 *  $Id: BaseTcontenedor.php 12 2010-07-06 04:34:57Z corlatti $
 */
abstract class BaseTcontenedor extends Doctrine_Record {
    public function setTableDefinition()
    {
        $this->setTableName('tcontenedor');
        $this->hasColumn('id', 'integer', 4, array('type' => 'integer', 'length' => 4, 'unsigned' => 1, 'primary' => true, 'autoincrement' => true));
        $this->hasColumn('idImportacion', 'integer', 4, array('type' => 'integer', 'length' => 4, 'unsigned' => 1, 'notnull' => true));
        $this->hasColumn('bl', 'string', 45, array('type' => 'string', 'length' => 45, 'notnull' => true));
        $this->hasColumn('nroContenedor', 'string', 45, array('type' => 'string', 'length' => 45, 'notnull' => true));
        $this->hasColumn('articulo', 'integer', 4, array('type' => 'integer', 'length' => 4, 'unsigned' => 1));
        $this->hasColumn('cantidad', 'float', null, array('type' => 'float', 'notnull' => true));
        $this->hasColumn('finsert', 'timestamp', null, array('type' => 'timestamp', 'notnull' => true));
    }

    public function setUp()
    {
        $this->hasOne('Importacion', array('local' => 'idImportacion',
                                           'foreign' => 'id'));

        $this->hasOne('Marticulo', array('local' => 'articulo',
                                         'foreign' => 'id'));
    }
}
?>